<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Hash;
use DB;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class GrddController extends Controller
{
    public function getList($oid)
    {
    	// dd($oid);
    	$res = DB::table('order')->where('id',$oid)->get();
    		$name = $res[0]->uid;
    	$nm = DB::table('user')->where('id',$name)->first();
    	// dd($nm);
    	// dd($res);
    	$data = DB::table('otable')->where('oid',$oid)->get();
    		$gid = $data[0]->gid;
    	$good = DB::table('goods')->where('id',$gid)->first();
    	// dd($good);
    	// dd($good->name);
    		// dd($gname);
        return view('home.grdd.ls',['res'=>$res,'data'=>$data,'goods'=>$good,'um'=>$nm]);
    }
}
